# 导包
import requests


# 定义一个类
class AddClass:
    # 定义方法
    def func_add(self, a, b):
        if 0 <= a <= 99 and 0 <= b <= 99:
            return a + b
        else:
            return "Input Error."


# 登录接口类
class LoginAPI:
    # 获取图片验证码
    def get_verify_code(self):
        return requests.get(url="http://kdtx-test.itheima.net/api/captchaImage")

    # 登录
    def login(self, test_data):
        return requests.post(url="http://kdtx-test.itheima.net/api/login", json=test_data)